<link rel="stylesheet" href="__PUBLIC__/plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="__SKIN__/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugins/ztree/js/jquery.ztree.core.min.js"></script>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<title>管理页面</title>
<link rel="stylesheet" href="/public/css/amazeui.min.css">
<link rel="stylesheet" href="/public/admin/css/iframe.css">
<link rel="stylesheet" href="/public/css/zTreeStyle/zTreeStyle.css">
<script src="/public/js/jquery.min.js"></script>
<script src="/public/js/jquery-ui.min.js"></script>
<script src="/public/admin/js/jquery.layout-latest.min.js"></script>
<script src="/public/js/jquery.ztree.core-3.5.min.js"></script>
<!--[if lt IE 9]>
<script src="/public/js/html5shiv.js"></script>
<script src="/public/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
  var myLayout;
  $(document).ready(function () {
      myLayout = $("body").layout({
      /*  全局配置 */
          closable:                   true    /* 是否显示点击关闭隐藏按钮*/
      ,   resizable:                  true    /* 是否允许拉动*/
      ,   maskContents:               true    /* 加入此参数，框架内容页就可以拖动了*/
      /*  顶部配置 */
      ,   north__spacing_open:        0       /* 顶部边框大小*/
      /*  底部配置 */
      ,   south__spacing_open:        0       /* 底部边框大小*/
      /*  some pane-size settings*/
      ,   west__minSize:              200     /*左侧最小宽度*/
      ,   west__maxSize:              500     /*左侧最大宽度*/
      /*  左侧配置 */
      ,   west__slidable:             false
      ,   west__animatePaneSizing:    false
      ,   west__fxSpeed_size:         "slow"  /* 'fast' animation when resizing west-pane*/
      ,   west__fxSpeed_open:         1000    /* 1-second animation when opening west-pane*/
      ,   west__fxSettings_open:      { easing: "easeOutBounce" } // 'bounce' effect when opening*/
      ,   west__fxName_close:         "none"  /* NO animation when closing west-pane*/
      ,   stateManagement__enabled:   false   /*是否读取cookies*/
      ,   showDebugMessages:          false 
      }); 
  });

    var zNodes =[
      { id:1, pId:0, name:"父节点1 - 展开", open:true},
      { id:11, pId:1, name:"父节点11 - 折叠"},
      { id:111, pId:11, name:"叶子节点111"},
      { id:112, pId:11, name:"叶子节点112"},
      { id:113, pId:11, name:"叶子节点113"},
      { id:114, pId:11, name:"叶子节点114"},
      { id:12, pId:1, name:"父节点12 - 折叠"},
      { id:121, pId:12, name:"叶子节点121"},
      { id:122, pId:12, name:"叶子节点122"},
      { id:123, pId:12, name:"叶子节点123"},
      { id:124, pId:12, name:"叶子节点124"},
      { id:13, pId:1, name:"父节点13 - 没有子节点", isParent:true},
      { id:2, pId:0, name:"父节点2 - 折叠"},
      { id:21, pId:2, name:"父节点21 - 展开", open:true},
      { id:211, pId:21, name:"叶子节点211"},
      { id:212, pId:21, name:"叶子节点212"},
      { id:213, pId:21, name:"叶子节点213"},
      { id:214, pId:21, name:"叶子节点214"},
      { id:22, pId:2, name:"父节点22 - 折叠"},
      { id:221, pId:22, name:"叶子节点221"},
      { id:222, pId:22, name:"叶子节点222"},
      { id:223, pId:22, name:"叶子节点223"},
      { id:224, pId:22, name:"叶子节点224"},
      { id:23, pId:2, name:"父节点23 - 折叠"},
      { id:231, pId:23, name:"叶子节点231"},
      { id:232, pId:23, name:"叶子节点232"},
      { id:233, pId:23, name:"叶子节点233"},
      { id:234, pId:23, name:"叶子节点234"},
      { id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true}
    ];
var zNodes=[{id:1,pId:0,name:'关于我们',url:'/admin-content-page-classid-1.html',target:'content_body'},{id:7,pId:1,name:'公司简介',url:'/admin-content-page-classid-7.html',target:'content_body'},{id:8,pId:1,name:'企业文化',url:'/admin-content-page-classid-8.html',target:'content_body'},{id:9,pId:1,name:'荣誉资质',url:'/admin-content-page-classid-9.html',target:'content_body'},{id:2,pId:0,name:'新闻中心',url:'/admin-content-lists-classid-2.html',target:'content_body'},{id:10,pId:2,name:'公司动态',url:'/admin-content-lists-classid-10.html',target:'content_body'},{id:11,pId:2,name:'行业资讯',url:'/admin-content-lists-classid-11.html',target:'content_body'},{id:3,pId:0,name:'产品展示',url:'/admin-content-lists-classid-3.html',target:'content_body'},{id:12,pId:3,name:'生活家电',url:'/admin-content-lists-classid-12.html',target:'content_body'},{id:15,pId:12,name:'电水壶',url:'/admin-content-lists-classid-15.html',target:'content_body'},{id:16,pId:12,name:'挂烫机',url:'/admin-content-lists-classid-16.html',target:'content_body'},{id:17,pId:12,name:'吸尘器',url:'/admin-content-lists-classid-17.html',target:'content_body'},{id:13,pId:3,name:'智能家电',url:'/admin-content-lists-classid-13.html',target:'content_body'},{id:14,pId:3,name:'配件产品',url:'/admin-content-lists-classid-14.html',target:'content_body'},{id:4,pId:0,name:'客户案例',url:'/admin-content-lists-classid-4.html',target:'content_body'},{id:18,pId:4,name:'城市规划',url:'/admin-content-lists-classid-18.html',target:'content_body'},{id:19,pId:4,name:'居住建筑',url:'/admin-content-lists-classid-19.html',target:'content_body'},{id:20,pId:4,name:'公共建筑',url:'/admin-content-lists-classid-20.html',target:'content_body'},{id:5,pId:0,name:'人才招聘',url:'/admin-content-lists-classid-5.html',target:'content_body'},{id:6,pId:0,name:'联系我们',url:'/admin-content-page-classid-6.html',target:'content_body'},]
    var setting={view:{dblClickExpand:false,showLine:true},data:{simpleData:{enable:true}},callback:{beforeExpand:beforeExpand,onExpand:onExpand,onClick:onClick}};
    var curExpandNode=null;
    function beforeExpand(treeId,treeNode) {
        var pNode=curExpandNode?curExpandNode.getParentNode():null;
        var treeNodeP=treeNode.parentTId?treeNode.getParentNode():null;
        var zTree=$.fn.zTree.getZTreeObj("tree");
        for(var i=0,l=!treeNodeP?0:treeNodeP.children.length;i<l; i++){
            if(treeNode!==treeNodeP.children[i]){zTree.expandNode(treeNodeP.children[i],false);}
        };
        while (pNode){
            if(pNode===treeNode){break;}
            pNode=pNode.getParentNode();
        };
        if(!pNode){singlePath(treeNode);}
    };
    function singlePath(newNode) {
        if (newNode === curExpandNode) return;
        if (curExpandNode && curExpandNode.open==true) {
            var zTree = $.fn.zTree.getZTreeObj("tree");
            if (newNode.parentTId === curExpandNode.parentTId) {
                zTree.expandNode(curExpandNode, false);
            } else {
                var newParents = [];
                while (newNode) {
                    newNode = newNode.getParentNode();
                    if (newNode === curExpandNode) {
                        newParents = null;
                        break;
                    } else if (newNode) {
                        newParents.push(newNode);
                    }
                }
                if (newParents!=null) {
                    var oldNode = curExpandNode;
                    var oldParents = [];
                    while (oldNode) {
                        oldNode = oldNode.getParentNode();
                        if (oldNode) {
                            oldParents.push(oldNode);
                        }
                    }
                    if (newParents.length>0) {
                        zTree.expandNode(oldParents[Math.abs(oldParents.length-newParents.length)-1], false);
                    } else {
                        zTree.expandNode(oldParents[oldParents.length-1], false);
                    }
                }
            }
        }
        curExpandNode = newNode;
    };
    
    function onExpand(event,treeId,treeNode){curExpandNode=treeNode;};
    
    function onClick(e,treeId,treeNode){
        var zTree=$.fn.zTree.getZTreeObj("tree");
        zTree.expandNode(treeNode,null,null,null,true);
    }
$(function(){
    $.fn.zTree.init($("#tree"),setting,zNodes);
    $(".ui-layout-north li:first-child").click();
});
</script>
</head>
<body>
<div class="ui-layout-west"><div id="tree" class="ztree"></div></div>
<div class="ui-layout-center"><iframe name="content_body" id="content_body" src="{:U('Archives/index_archives')}" width="100%" height="100%" frameborder="0"></iframe></div>
</body>
</html>